load("@npm_bazel_typescript//:defs.bzl", "ts_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])  # Apache License 2.0

genrule(
    name = "env_gen",
    srcs = [
        ":environment.dev.ts",
        ":environment.prod.ts",
    ],
    outs = ["environment.ts"],
    cmd = select({
        "//:environment": "cat $(location :environment.dev.ts) > $@",
        "//conditions:default": "cat $(location :environment.prod.ts) > $@",
    }),
)

ts_library(
    name = "environments",
    srcs = [":environment.ts"],
)
